<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="{ADMIN_THEME}images/reset.css" rel="stylesheet" type="text/css" />
    <link href="{ADMIN_THEME}images/system.css" rel="stylesheet" type="text/css" />
    <link href="{ADMIN_THEME}images/dialog.css" rel="stylesheet" type="text/css" />
    <link href="{ADMIN_THEME}images/main.css" rel="stylesheet" type="text/css" />
    <link href="{ADMIN_THEME}images/switchbox.css" rel="stylesheet" type="text/css" />
    <link href="{ADMIN_THEME}luos/css/style.min.css?v=4.1.0" rel="stylesheet"><link href="{ADMIN_THEME}images/table_form.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="{ADMIN_THEME}js/layui/css/layui.css">
    <script src="{ADMIN_THEME}js/layui/lay/dest/layui.all.js"></script>
    <script type="text/javascript" src="{ADMIN_THEME}js/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(
            function(){
                $("#dr_select").click(
                   function()
                   {
                       if($("#dr_select").attr('checked')) {
                           $(".dr_select").attr("checked",true);
                       } else {
                           $(".dr_select").attr("checked",false);
                       }
                   }
                )
            }
        );
    </script>
    <title>admin</title>
</head>
<body style="font-weight: normal;">
<div class="subnav">
    <div class="content-menu ib-a line-x">
        <div class="layui-btn-group">
            <!-- <a class="layui-btn" href="{url('admin/wx/user')}" class="on"><em>用户管理</em></a> -->
            <a class="layui-btn" href="{url('admin/zhou_position/work_salary_edit')}"><em>添加</em></a>
        </div>
    </div>
    <div class="bk10"></div>
    <div class="table-list">
        <form action="" method="post" name="myform">
            <!--<input name="action" id="action" type="hidden" />-->
            <table width="100%">
                <tr>
                    
                    <td width="120" align="center">排序</td>
                    <td width="120" align="center">薪资范围</td>
                     <!--<td width="120" align="center">是否显示</td>-->
                    <td width="120" align="center">操作时间</td>
                    <td width="120" align="center">操作</td>
                </tr>
                {loop $res $key=>$t}
                <tr>
                    <!--<td align="center">{$t['time_id']}</td>-->
                    <td align="center"><input type="hidden" name="salary_id[]" value="{$t['salary_id']}" ><input  type="text" class="input-text" style="width:35px; text-align:center" size="1" name="ord[]" value="{$t['salary_ord']}"></td>
                    <td align="center">{$t['salary_name']}</td>
                    <!--<td align="center">{if $t['time_show'] == 1}<span class="label label-success">√</span>{else} <span class="label label-important">×</span> {/if}</td>-->

                    <td align="center">{date('Y-m-d H:i',$t['addtime'])}</td>
                    <td align="center"><a class="layui-btn layui-btn-small layui-btn btn-xs" href="{url('admin/zhou_position/work_salary_edit',array('edit_id'=>$t['salary_id']))}">编辑</a>
                        <a class="layui-btn layui-btn-small layui-btn-danger " href="{url('admin/zhou_position/work_salary_del',array('del_id'=>$t['salary_id']))}">删除</a></td>
                </tr>
                {/loop}
                <tr>
                    <!-- <td align="center"><input type="submit" class="btn btn-success btn-sm"  value="删除" />&nbsp;</td> -->
                    <td align="center"><input type="submit" class="btn btn-success btn-sm "  value="排序"></td>
                    <td align="center">&nbsp;</td>
                    <td align="center">&nbsp;</td>
                    <!--<td align="center">&nbsp;</td>-->
                    <td align="center">&nbsp;</td>
                </tr>
            </table>
            {$pagelist}
        </form>
    </div>
</div>
<script>
    // 确定删除
    $('.btn-danger').click(function(){
        if (confirm('您确定要删除吗 ?')) {
            return true;
        }
        return false;
    })
    // 排序
    $('.ord').click(function(){

        var ord = [];
        var del_id = [];
        $("input[name='ord[]']").each(function(){
             ord.push($(this).val());
        })
        $("input[name='del_id[]']").each(function(){
             del_id.push($(this).val());
        })
        $.ajax({
            'url':'index.php?s=admin&c=Golf_ball&a=update_notice_ord',
            'type':'post',
            'dataType':'json',
            'async':false,
            'data':{
                'ord':ord,
                'del_id':del_id,
            },
            success:function(data){
                if (data.str == 1) {
                    window.location.reload();
                }
            }
        })
        return false;
    })
</script>
</body>
</html>